package com.shangxian.giveithome.service;

import com.shangxian.giveithome.entity.PageableDetails;
import com.shangxian.giveithome.entity.petCard.inputParam.*;
import com.shangxian.giveithome.entity.petCard.outputParam.BackPetCardDetails;
import com.shangxian.giveithome.entity.petCard.outputParam.BackVaccinesRecordList;
import com.shangxian.giveithome.entity.petCard.outputParam.InoculationRecordDetails;
import com.shangxian.giveithome.entity.petCard.outputParam.PetCardDetails;
import org.springframework.data.domain.Pageable;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * @author coderFu
 * @create 2021/5/2
 */
public interface PetCardService {

    /**
     * 根据宠牌编号查看宠物的详细信息
     * @param id
     * @param request
     * @param address
     * @return
     */
    Object findPetMessage(Long id, HttpServletRequest request, Address address);

    /**
     * 宠牌绑定宠物信息
     * @param bandingPetMessage
     * @param request
     * @return
     */
    void bandingPetMessage(BandingPetMessage bandingPetMessage,HttpServletRequest request);

    /**
     * 录入接种疫苗信息
     * @param vaccinesMessageParam
     * @param request
     */
    void recordInoculationMessage(VaccinesMessageParam vaccinesMessageParam, HttpServletRequest request);

    /**
     * 根据二维码id查询宠物牌描记录详情
     * @param id
     * @param pageable
     * @return
     */
    PageableDetails findActionRecord(Long id, Pageable pageable);

    /**
     * 根据二维码记录id查询宠物接种记录信息
     * @param id
     * @return
     */
    List<InoculationRecordDetails> findInoculationRecord(Long id);

    /**
     * 根据用户id查询所有宠牌信息
     * @param request
     * @return
     */
    List<PetCardDetails> findMyPetCardMessages(HttpServletRequest request);

    /**
     * 更新宠牌绑定的信息
     * @param bandingPetMessage
     * @return
     */
    void updatePetCardMessage(BandingPetMessage bandingPetMessage);

    /**
     * 根据宠牌id查询宠物用户信息
     * @param id
     * @return
     */
    BandingPetMessage findPetMessageById(Long id);

    /**
     * 根据二维码id查询二维码路径
     * @param id
     * @return
     */
    String findPetQrCodePathById(Long id);

    /**
     * 通过二维码id查询宠物主人详情接口
     * @param id
     * @return
     */
    PetCardDetails findPetCardDetailsByQrId(Long id);




    /**
     * 以下为后台接口
     */

    /**
     * 后台查询宠物信息表
     * @param pageable
     * @param backSearchParam
     * @return
     */
    PageableDetails backFindPetCardList(Pageable pageable,BackSearchParam backSearchParam);

    /**
     * 根据宠牌表id查询宠物主人详细信息
     * @param id
     * @return
     */
    BackPetCardDetails backFindPetCardDetailsById(Long id);


    /**
     * 后台根据宠牌表id修改宠牌绑定信息
     * @param backUpdatePetCardParam
     */
    void backUpdatePetCardMessage(BackUpdatePetCardParam backUpdatePetCardParam);

    /**
     * 后台录入主人身份证信息制作宠物证书
     * @param id
     * @param identityId
     */
    void backMakePetCert(Long id, String identityId);

    /**
     * 根据宠牌编号查询接种记录
     * @param petCardCodeId
     * @return
     */
    List<BackVaccinesRecordList> backFindVaccinesRecordByPetCardCodeId(Long petCardCodeId);

    /**
     * 后台根据宠物编号添加接种记录
     * @param backAddVaccinesParam
     */
    void backAddVaccines(BackAddVaccinesParam backAddVaccinesParam);
}
